<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Pragma" content="no-cache" />
		<title>区域/销售商管理--易安网</title>
		<%@ include file="/user_comm.jsp"%>

		<link rel="stylesheet"
			href="http://a.tbcdn.cn/apps/sell/1.0/publish_detail_ke.css?t=20110128editor.css" />
		<link href="<%=request.getContextPath()%>/css/prop.css"
			type="text/css" rel="stylesheet" />
	</head>
	<body>
		<%@ include file="/user_top.jsp"%>
		<div class="realCer">
			<!--导航-->
			<!--主体部分start-->
			<div class="realMain clearfix mt10">
				<%@ include file="/user_menu.jsp"%>
				<div class="realRight ml10 Buyer">
					<div class="mybox">
						<div class="mytit">
							区域/销售商管理
						</div>
						<div class="con Orbuy">
							<s:form name="formpage" action="area_list" namespace="/">
								<%@ include file="/messages.jsp"%>
								<div class="pCenter">
									<div class="at_tab_t">
									</div>
									<div>
										<div class="search_bcontrol">
											区域/销售商名称：
											<input id="areaName" name="areaDto.areaName" value="${areaDto.areaName}" maxlength="20"
												size="30" type="text" />
											<button type="submit"
												class="J_MakePoint btn search-btn">
												搜索
											</button>
											<s:if test="1==#request.currentUser.userRole">
												<!-- 系统管理员才可以添加区域/销售商 -->
											&nbsp;&nbsp;<a class="at_but b_2_g"
													href="<%=request.getContextPath()%>/area_editPage.do?type=1"
													title="新增区域"><u></u>新增区域</a>
													&nbsp;<a class="at_but b_2_g"
													href="<%=request.getContextPath()%>/area_editPage.do?type=2"
													title="新增销售商"><u></u>新增销售商</a>
											</s:if>
										</div>
									</div>

									<table class="favorRwList mt5">
										<tr>
											<th class="title">
												区域
											</th>
											<th class="title">
												销售商名称
											</th>
											<th class="title">
												电话
											</th>
											<th class="title">
												备注
											</th>
											
											<s:if
												test="1==#request.currentUser.userRole || 2==#request.currentUser.userRole">
												<th class="title">
													操作
												</th>
											</s:if>
										</tr>
										<s:iterator value="#request.areas" id="ca">
											<tr>
												<s:if test="#ca.type == 1 ">
												<td>
													<font style="font-weight:bold"><s:property value="#ca.areaName" /></font>
												</td>
												<td>
													
												</td>
												</s:if>
												<s:else>
												<td>
													
												</td>
												<td>
													<s:property value="#ca.areaName" />
												</td>
												</s:else>
												
												<td>
													<s:property value="#ca.phone" />
												</td>
												<td>
													<s:property value="#ca.remark" />
												</td>												
												<s:if
													test="1==#request.currentUser.userRole || 2==#request.currentUser.userRole">
													<td>
														<s:if
															test="1==#request.currentUser.userRole ">
															<!-- 系统管理员 -->
															<a
																href="<s:url action="area_editPage"><s:param name="id"><s:property value="#ca.id"/></s:param></s:url>">
																修改 </a>
														</s:if>
														<s:if test="1==#request.currentUser.userRole">
															<a
																href="<s:url action="area_delete"><s:param name="id"><s:property value="#ca.id"/></s:param></s:url>" onclick="return window.confirm('你确定要删除吗?');">
																删除 </a>
														</s:if>
													</td>
												</s:if>
											</tr>
										</s:iterator>
										<s:if test="#request.areas.size()==0">
											<tr>
												<td colspan="4">
													<span class='orange1 ml5'>没有满足条件的记录</span>
												</td>
											</tr>
										</s:if>
									</table>
									<!--
									<s:property value="#request.allowpage" escape="false" />
									-->
								</div>
							</s:form>
						</div>
					</div>
				</div>
				<!--主体部分end-->
			</div>
		</div>
		<!--底部 start-->
		<%@ include file="/user_button.jsp"%>
		<!--底部end-->
	</body>
</html>
